/*
 * Copyright 2011 The Rusted Roof, LLC.
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

package org.proteusframework.api;

import org.proteusframework.api.model.IQualifiedName;
import org.proteusframework.extension.IAdaptable;

import java.util.Map;

/**
 * Post-parse runtime configuration.
 *
 * @author Tacoma Four
 */
public interface IRuntimeConfiguration extends IAdaptable, IDelegateConsumer
{
    /**
     * Map of configuration properties read from the runtime configuration.
     *
     * @return Map of qualified name-object pairs that define the runtime environment
     */
    Map<IQualifiedName, Object> getConfigurationMap();

    /**
     * Lookup the runtime configuration value for the specified key.
     *
     * @param qualifiedName Qualified name to locate
     * @return Object value, or null if no value is associated with the given qualified name
     */
    Object getValue(IQualifiedName qualifiedName);

    /**
     * Determine if the runtime configuration defins a value for the given key.
     *
     * @param qualifiedName Qualified name to location
     * @return true, if a value is associated with the given key
     */
    boolean hasValue(IQualifiedName qualifiedName);
}